package com.code.pattern.strategy.activity;

import com.code.pattern.strategy.promotion.PromotionStrategy;

/**
 * 发布一个活动，活动可以有多种策略供选择，最终的结果都是为了减少钱
 * @author: liyufei
 * @date: 2021-04-01 20:07
 */
public class PromotionActivity {

    private PromotionStrategy promotionStrategy;

    public PromotionActivity(PromotionStrategy promotionStrategy) {
        this.promotionStrategy = promotionStrategy;
    }

    public void execute() {
        this.promotionStrategy.doPromotion();
    }
}
